<template>
  <div style="margin: 0 auto" :class="{ isCheck: isCheck }">
    <a-tabs type="card" @change="tabsChange" class="tabs_style">
      <a-tab-pane v-for="item in tabs" :key="item.key" :tab="item.title">
        <component
          v-if="active == item.key"
          :is="`${item.key}`"
          :id="model.id"
          :stage="model.stage"
          :protype="model.type"
          :bsjdwName="model.bsjdwName"
          :bsjdw="model.bsjdw"
          :type="viewTypeId[item.value]"
        ></component>
      </a-tab-pane>
    </a-tabs>
  </div>
</template>
<script>
import bgcg from '../commView/bgcg/index'
import zqyjg from '../commView/zqyjg/index'
import clyj from '../commView/clyj/index'
import bgxdb from '../commView/bgxdb/index'
import bgdg from '../commView/bgdg/index'
import shjl from '../commView/bgshjl/index'
import viewTypeId from '../commView/public/typeId'
import wtqd from '@views/sj/sjxmzygl/commView/wtqd/index.vue'

export default {
  name: 'contentView',
  components: {
    bgcg,
    zqyjg,
    clyj,
    bgxdb,
    bgdg,
    shjl,
    wtqd,
  },
  props: ['model'],
  data() {
    return {
      active: 'bgcg',
      viewTypeId: viewTypeId,
      disableSubmit: false,
      title: '',
      visible: false,
      isCheck: false,
      tabs: [
        { key: 'bgcg', title: '报告初稿', value: '报告初稿' },
        { key: 'zqyjg', title: '征求意见稿', value: '征求意见稿' },
        { key: 'clyj', title: '处理意见', value: '处理意见' },
        { key: 'bgxdb', title: '报告修订版', value: '报告修订版' },
        { key: 'bgdg', title: '报告定稿', value: '报告定稿' },
        { key: 'wtqd', title: '问题清单', value: '问题清单' },
        { key: 'shjl', title: '审核记录', value: '报告初稿' },
      ],
    }
  },
  methods: {
    tabsChange(key) {
      this.active = key
    },
  },
}
</script>

<style lang='less' scoped>
@import '~@assets/less/tableTheme.less';
@import '../../css/checkAndEdit.less';
</style>
